import {useSelector} from "react-redux";
import {Button} from "antd";

export default function ChildIndex(props){
    let {msg} = props
    let select = useSelector(({countInfo}) => {
        return countInfo.num
    })
    return(
        <div>
            <hr/>
            <p>这是子组件</p>
            <p>{select}</p>
            <Button type={'primary'} onClick={() => msg(Math.random()+10)}>子组件传参给父组按钮</Button>
        </div>
    )
}